namespace ShadeTree.WinForms.Tests
{
    public class UserResponse
    {
        private string _body;
        private string _caption;


        public UserResponse(string caption, string body)
        {
            _body = body;
            _caption = caption;
        }


        public UserResponse(string caption, string body, bool response)
        {
            Response = response;
            _body = body;
            _caption = caption;
        }

        public bool Response { get; set; }

        public string Body
        {
            get { return _body; }
            set { _body = value; }
        }

        public string Caption
        {
            get { return _caption; }
            set { _caption = value; }
        }

        public bool Matches(string caption, string body)
        {
            bool returnValue = caption == _caption || body == _caption;
            if (!string.IsNullOrEmpty(_body))
            {
                returnValue = returnValue && _body == body;
            }

            return returnValue;
        }
    }
}